import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
import HotMoneyListView from '../views/HotMoneyListView.vue'
import HotMoneyDetailView from '../views/HotMoneyDetailView.vue'
import StockListView from '../views/StockListView.vue'
import PriceChartDemo from '../views/PriceChartDemo.vue'
import TradingChartDemo from '../views/TradingChartDemo.vue'
import BarChartTest from '../views/BarChartTest.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect: '/hot-money-list'
    },
    {
      path: '/home',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue'),
    },
    {
      path: '/hot-money-list',
      name: 'hotMoneyList',
      component: HotMoneyListView,
    },
    {
      path: '/hot-money-detail/:id?',
      name: 'hotMoneyDetail',
      component: HotMoneyDetailView,
    },
    {
      path: '/stock-list',
      name: 'stockList',
      component: StockListView,
    },
    {
      path: '/price-chart-demo',
      name: 'priceChartDemo',
      component: PriceChartDemo,
    },
    {
      path: '/trading-chart-demo',
      name: 'tradingChartDemo',
      component: TradingChartDemo,
    },
    {
      path: '/bar-chart-test',
      name: 'barChartTest',
      component: BarChartTest,
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../views/LoginView.vue'),
    },
  ],
})

export default router
